-- GENERATED SPELL FOR [Bloodsail Elder Magus] --


function spell0_1653(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(11969,pUnit)
pUnit:RegisterEvent('Sorts_1653', 2000, 1)
end

function spell1_1653(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1653', 3000, 1)
end

function spell2_1653(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(20827,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1653', 11000, 1)
end

function Sorts_1653(pUnit, Event)
local choix_sorts_1653 = math.random(0, 2)
if choix_sorts_1653 == 0 then
pUnit:RegisterEvent('spell0_1653', 1, 1)
end
if choix_sorts_1653 == 1 then
pUnit:RegisterEvent('spell1_1653', 1, 1)
end
if choix_sorts_1653 == 2 then
pUnit:RegisterEvent('spell2_1653', 1, 1)
end
end

function mob1653_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1653', math.random(1500, 3000), 1)
end

function mob1653_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1653_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1653_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1653, 1, 'mob1653_Action')
RegisterUnitEvent(1653, 2, 'mob1653_Leave')
RegisterUnitEvent(1653, 3, 'mob1653_Kill')
RegisterUnitEvent(1653, 4, 'mob1653_Die')
